﻿using _05.状态模式.Entities;
using _05.状态模式.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _05.状态模式.States
{
    /// <summary>
    /// 项目状态基类
    /// </summary>
    internal abstract class ProjectState
    {
        #region 00.静态字段及构造器

        /// <summary>
        /// 单例 - 洽谈状态
        /// </summary>
        public static readonly DiscussingState DiscussingState;

        /// <summary>
        /// 单例 - 已签约状态
        /// </summary>
        public static readonly SignedState SignedState;

        /// <summary>
        /// 单例 - 施工状态
        /// </summary>
        public static readonly ConstructingState ConstructingState;

        /// <summary>
        /// 单例 - 完工状态
        /// </summary>
        public static readonly CompleteState CompleteState;

        /// <summary>
        /// 单例 - 已结算状态
        /// </summary>
        public static readonly SettledState SettledState;

        /// <summary>
        /// 静态构造函数
        /// </summary>
        static ProjectState()
        {
            DiscussingState = new DiscussingState();
            SignedState = new SignedState();
            ConstructingState = new ConstructingState();
            CompleteState = new CompleteState();
            SettledState = new SettledState();
        }

        #endregion

        #region 01.签约 —— void Sign(Project project)
        /// <summary>
        /// 签约
        /// </summary>
        /// <param name="project">项目</param>
        public abstract void Sign(Project project);
        #endregion

        #region 02.施工 —— void Construct(Project project)
        /// <summary>
        /// 施工
        /// </summary>
        /// <param name="project">项目</param>
        public abstract void Construct(Project project);
        #endregion

        #region 03.完工 —— void Finish(Project project)
        /// <summary>
        /// 完工
        /// </summary>
        /// <param name="project">项目</param>
        public abstract void Finish(Project project);
        #endregion

        #region 04.结算 —— void Settle(Project project)
        /// <summary>
        /// 结算
        /// </summary>
        /// <param name="project">项目</param>
        public abstract void Settle(Project project);
        #endregion
    }
}
